<template>
  <div>
    <el-card>
      <div class="flexBox">
        <img :src="userStore.userDetail.avatar" />
        <div class="userinfo">
          <h1>{{ getTimeMsg() + "好，" + userStore.userDetail.name }}</h1>
          <h4>{{ setting.title }}</h4>
        </div>
      </div>
    </el-card>

    <svg-icon
      style="width: 100%; height: 300px; margin-top: 100px"
      name="welcome"
      width="100%"
      height="100%"
    ></svg-icon>
  </div>
</template>

<script setup lang="ts">
import { getTimeMsg } from "@/utils/time";
import setting from "@/setting";
import useUserStore from "@/store/modules/user";

let userStore = useUserStore();
</script>

<style scoped lang="scss">
.flexBox {
  display: flex;
  align-items: center;

  img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
  }
  .userinfo {
    margin-left: 50px;
    height: 100%;
    h1 {
      margin-bottom: 40px;
      font-weight: bold;
      font-size: 25px;
    }
    h4 {
      color: rgb(124, 120, 120);
      font-style: italic;
    }
  }
}
</style>
